
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class SettingItem extends StatelessWidget {
  final int index;
  final String icon;
  final String lable;
  final Function onTap;
  const SettingItem(this.index, this.icon,this.lable,this.onTap,{super.key});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: ()=>{
        onTap(index)
      },
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: 24.0,vertical: 16.0),
        decoration: const BoxDecoration(
          color: Colors.white,
        ),
        child: Row(
          children: [
            SizedBox(
                width: 20.r,
                height: 20.r,
                child: Image.asset(icon)
            ),
            SizedBox(width: 12.r),
            Expanded(child: Text(lable)),
            SizedBox(
                width: 20.r,
                height: 20.r,
                child: Image.asset('./assets/images/icon_more.png')
            ),
          ],
        ),
      ),
    );
  }
}
